//
//  CLTextFiled.swift
//  CLEasyBBQ
//
//  Created by simon zhao on 2017/4/30.
//  Copyright © 2017年 simon zhao. All rights reserved.
//

import UIKit

class CLTextFiled: UITextField {

    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */
    override func leftViewRect(forBounds bounds: CGRect) -> CGRect {
        
        var iconRect = super.leftViewRect(forBounds: bounds)
        iconRect.origin.x += 15
        return iconRect
    }
    
    override func placeholderRect(forBounds bounds: CGRect) -> CGRect {
        
        var iconRect = super.placeholderRect(forBounds: bounds)
        iconRect.origin.x += 0
        return iconRect
    }
    
    override func editingRect(forBounds bounds: CGRect) -> CGRect {
        
        var iconRect = super.editingRect(forBounds: bounds)
        iconRect.origin.x += 15
        return iconRect
    }
    
    override func textRect(forBounds bounds: CGRect) -> CGRect {
        
        var iconRect = super.textRect(forBounds: bounds)
        iconRect.origin.x += 15
        return iconRect
    }

}
